const path = require("path");
module.exports = {
  publicPath: process.env.NODE_ENV === "production" ? "./" : "./",
  outputDir: "dist",
  lintOnSave: true,
  runtimeCompiler: true,
  configureWebpack: config => {
    Object.assign(config, {
      resolve: {
        extensions: [".js", ".vue", ".json"], //文件优先解析后缀名顺序
        alias: {
          "@": path.resolve(__dirname, "./src"),
          "@c": path.resolve(__dirname, "./src/components"),
          "@v": path.resolve(__dirname, "./src/views"),
          "@u": path.resolve(__dirname, "./src/utils"),
          "@s": path.resolve(__dirname, "./src/service")
        }
      }
    });
  },
  productionSourceMap: false,
  css: {
    sourceMap: false,
    loaderOptions: {},
    modules: false
  },
  devServer: {
    open: false,
    port: 8080,
  },
};